<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: pipi
  Date: 2018/5/5
  Time: 20:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>报价</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/build/css/doc.css" media="all">
</head>
<body>
<div class="layui-form-item">
    <label class="layui-form-label">更新</label>
    <div class="layui-input-block site-block">
        <form class="layui-form" action="/customer/update" method="post">
            <input type="hidden" name="customerNO" value="${customer.customerNO}">
            <div class="layui-form-item">
                <label class="layui-form-label">客户名</label>
                <div class="layui-input-block">
                    <input type="text" value="${customer.customerName}" name="customerName" required
                           lay-verify="required" placeholder="请输入客户名" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-block">
                    <input type="text" value="${customer.password}" name="password" required  lay-verify="required"
                           placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">客户等级</label>
                <div class="layui-input-block">
                    <select name="rank" lay-verify="">
                        <option value="0" <c:if test="${0==customer.rank}">selected</c:if>>普通用户</option>
                        <option value="1" <c:if test="${1==customer.rank}">selected</c:if>>一级会员</option>
                        <option value="2" <c:if test="${2==customer.rank}">selected</c:if>>二级会员</option>
                        <option value="3" <c:if test="${3==customer.rank}">selected</c:if>>三级会员</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-block">
                    <input type="text" value="${customer.phone}" name="phone" required
                           lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">客户地址</label>
                <div class="layui-input-block">
                    <input type="text" value="${customer.address}" name="address" required  lay-verify="required"
                           placeholder="请输入地址" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">联系人</label>
                <div class="layui-input-block">
                    <input type="text" value="${customer.relationMan}" name="relationMan" required  lay-verify="required"
                           placeholder="请输入联系人" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">其他信息</label>
                <div class="layui-input-block">
                    <input type="text" value="${customer.otherInfo}" name="otherInfo" required  lay-verify="required" placeholder="其他信息" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="/plugins/layui/layui.js"></script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            // layer.msg(JSON.stringify(data.field));
            console.log(data);
            return true;

        });
    });
</script>
</body>
</html>
